/*
Digital Image Processing - Final Project
9 December 2011

Joseph Dombrowski
Josh Dixon
Junmo An
*/

#ifndef Common_h
#define Common_h

#include <vector>

#define _PI 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 // Yeah, it's overkill, but why not.
#define _E 2.71828182846

using namespace std;

struct pointD
{
	pointD()
	{ x = -1; y = -1; }
	pointD(double X, double Y)
	{ x = X; y = Y; }

	double x;
	double y;
};

struct point
{
	point()
	{ x = -1; y = -1; }
	point(int X, int Y)
	{ x = X; y = Y; }

	int x;
	int y;
};

struct edgePoint
{
	edgePoint(point loc, double mag, double dir)
	{
		magnitude = mag;
		direction = dir;
	}
	edgePoint()
	{
		magnitude = -1;
		direction = -1;
	}
	double magnitude;
	double direction;
};

struct edge
{
	vector<point> points;
	vector<int> direction;
	double angle;
};

class Common
{
	public:
		static double getDist(point p1, point p2)
		{
			return (double)sqrt((double)(p1.x-p2.x)*(p1.x-p2.x) + (p1.y-p2.y)*(p1.y-p2.y));
		};
};
#endif